<?php
/**
 * LICENSE
 *
 * This source file is subject to the new BSD license that is bundled with this
 * package in the file LICENSE.txt. It is also available through the
 * world-wide-web at this URL: http://dragonjsonserver.de/license. If you did
 * not receive a copy of the license and are unable to obtain it through the
 * world-wide-web, please send an email to license@dragonjsonserver.de. So we
 * can send you a copy immediately.
 *
 * @copyright Copyright (c) 2012 DragonProjects (http://dragonprojects.de)
 * @license http://framework.zend.com/license/new-bsd New BSD License
 * @author Christoph Herrmann <developer@dragonjsonserver.de>
 */
?>
<!DOCTYPE html>
<html lang="de">
    <head>
        <meta charset="utf-8">
        <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;">
        <title>
            <?php
                echo $this->application->name;
                if (isset($this->navigation->header->{$this->controllername})) {
                    echo ' - ' . $this->navigation->header->{$this->controllername};
                }
                if (isset($this->navigation->footer->{$this->controllername})) {
                    echo ' - ' . $this->navigation->footer->{$this->controllername};
                }
            ?>
        </title>
        <link href="<?php echo $this->baseUrl('css/bootstrap.min.css'); ?>" rel="stylesheet">
        <style type="text/css">
            body {
                padding-top : 60px;
                padding-bottom : 60px;
            }
            .sidebar-nav {
                padding : 9px 0;
            }
            th, td {
                vertical-align : top;
                text-align : left;
            }
            table, select, input {
                width : 100%;
            }
        </style>
        <link href="<?php echo $this->baseUrl('css/bootstrap-responsive.min.css'); ?>" rel="stylesheet">
        <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
    </head>
    <body>
        <div class="navbar navbar-fixed-top">
            <div class="navbar-inner">
                <div class="container">
                    <span class="brand"><?php echo $this->application->name . ' ' . $this->application->version; ?></span>
                    <ul class="nav">
                        <?php foreach ($this->navigation->header as $controller => $navigation) { ?>
                            <li<?php echo $this->controllername == $controller ? ' class="active"' : ''; ?>><a href="<?php echo $this->url(array('controller' => $controller), null, true); ?>"><?php echo $navigation; ?></a></li>
                        <?php } ?>
                    </ul>
                </div>
            </div>
        </div>
        <div class="container">
            <?php echo $this->layout()->content ?>
            <footer>
                <div class="navbar navbar-fixed-bottom">
                    <div class="navbar-inner">
                        <div class="container">
                            <span class="brand"><?php echo $this->application->copyright; ?></span>
                            <ul class="nav">
                                <?php foreach ($this->navigation->footer as $controller => $navigation) { ?>
                                    <li<?php echo $this->controllername == $controller ? ' class="active"' : ''; ?>><a href="<?php echo $this->url(array('controller' => $controller), null, true); ?>"><?php echo $navigation; ?></a></li>
                                <?php } ?>
                            </ul>
                        </div>
                    </div>
                </div>
            </footer>
        </div>
        <script src="<?php echo $this->baseUrl('javascript/bootstrap.min.js'); ?>"></script>
        <!--[if lt IE 9]>
            <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
        <![endif]-->
    </body>
</html>
